package NowCoderHuaWei;
import java.util.*;
public class Test06{
    public static void main(String[] args)
        {
        Scanner in=new Scanner(System.in);
        while(in.hasNext())
            {
            long n=in.nextLong();
            printPrime(n);
        }
        in.close();
    }
    public static void printPrime(long n)
        {
        int i=2;
        /*if(n==i)
         {
           System.out.println(n);
            return;
        }*/
        while(n>=i)
            {
            if(n%i==0)
                {
                System.out.print(i+" ");
                n=n/i;
            }else
                i++;
        }
    }
}
